/*  1:   */ package com.atomikos.util;
/*  2:   */ 
/*  3:   */ import java.io.PrintWriter;
/*  4:   */ import java.io.StringWriter;
/*  5:   */ 
/*  6:   */ public class ExceptionHelper
/*  7:   */ {
/*  8:   */   public static String convertStackTrace(Throwable e)
/*  9:   */   {
/* 10:41 */     String ret = null;
/* 11:42 */     if (e != null)
/* 12:   */     {
/* 13:43 */       StringWriter sw = new StringWriter();
/* 14:44 */       PrintWriter pw = new PrintWriter(sw);
/* 15:45 */       e.printStackTrace(pw);
/* 16:46 */       pw.close();
/* 17:47 */       String string = sw.toString();
/* 18:48 */       ret = string.substring(0, string.length() - 1);
/* 19:   */     }
/* 20:50 */     return ret;
/* 21:   */   }
/* 22:   */ }


/* Location:           C:\myfile\mysoft\apache-maven-3.5.0-bin\apache-maven-3.5.0\myrep\com\atomikos\atomikos-util\3.7.0\atomikos-util-3.7.0.jar
 * Qualified Name:     com.atomikos.util.ExceptionHelper
 * JD-Core Version:    0.7.0.1
 */